package com.nf.ch03.test02.entity;

/**
 * @author lwj
 * @date 2025-03-03
 * @vesion 1.0.0
 */
public class RabbitAnimal extends Animal{
    // 构造方法
    public RabbitAnimal() {}
    public RabbitAnimal(String name) {
        super(name);
    }

    @Override
    public void eat() {
        System.out.println(this.getName());
    }
    public void eat(String food){
        System.out.println(this.getName()+"吃"+food);
    }

    @Override
    public void sleep() {
        System.out.println(this.getName()+"睡觉");
        super.sleep();
    }
}
